package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * Company entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_COMPANY", schema = "HCD_DEV")
public class Company extends Entity implements java.io.Serializable {

	// Fields

	private Long companyId;
	private String name;
	private Boolean isOpen;
	private String contacts;
	private String phone;
	private String address;
	private String product;
	private String profile;
	private Integer codePrefix;
	private Integer codeSeq;
	private Integer codeRemain;
	private Integer storeRemain;
	private Integer catRemain;
	private Integer memRemain;
	private Float prepaid;
	private Integer memPromote;
	private Long addTime;
	private Set<GoodsClassify> goodsClassifies = new HashSet<GoodsClassify>(0);
	private Set<CompanyMember> companyMembers = new HashSet<CompanyMember>(0);
	private Set<MemberPromote> memberPromotes = new HashSet<MemberPromote>(0);
	private Set<Store> stores = new HashSet<Store>(0);
	private Set<MemberPrepaid> memberPrepaids = new HashSet<MemberPrepaid>(0);
	private Set<Role> roles = new HashSet<Role>(0);
	private Set<Goods> goodses = new HashSet<Goods>(0);
	private Set<MemberVip> memberVips = new HashSet<MemberVip>(0);

	// Constructors

	/** default constructor */
	public Company() {
	}

	/** minimal constructor */
	public Company(String name, Boolean isOpen, String contacts, String phone, String address,
			Integer codePrefix, Integer codeSeq, Integer codeRemain, Integer storeRemain,
			Integer catRemain, Integer memRemain, Float prepaid, Integer memPromote, Long addTime) {
		this.name = name;
		this.isOpen = isOpen;
		this.contacts = contacts;
		this.phone = phone;
		this.address = address;
		this.codePrefix = codePrefix;
		this.codeSeq = codeSeq;
		this.codeRemain = codeRemain;
		this.storeRemain = storeRemain;
		this.catRemain = catRemain;
		this.memRemain = memRemain;
		this.prepaid = prepaid;
		this.memPromote = memPromote;
		this.addTime = addTime;
	}

	/** full constructor */
	public Company(String name, Boolean isOpen, String contacts, String phone, String address,
			String product, String profile, Integer codePrefix, Integer codeSeq,
			Integer codeRemain, Integer storeRemain, Integer catRemain, Integer memRemain,
			Float prepaid, Integer memPromote, Long addTime, Set<GoodsClassify> goodsClassifies,
			Set<CompanyMember> companyMembers, Set<MemberPromote> memberPromotes,
			Set<Store> stores, Set<MemberPrepaid> memberPrepaids, Set<Role> roles,
			Set<Goods> goodses, Set<MemberVip> memberVips) {
		this.name = name;
		this.isOpen = isOpen;
		this.contacts = contacts;
		this.phone = phone;
		this.address = address;
		this.product = product;
		this.profile = profile;
		this.codePrefix = codePrefix;
		this.codeSeq = codeSeq;
		this.codeRemain = codeRemain;
		this.storeRemain = storeRemain;
		this.catRemain = catRemain;
		this.memRemain = memRemain;
		this.prepaid = prepaid;
		this.memPromote = memPromote;
		this.addTime = addTime;
		this.goodsClassifies = goodsClassifies;
		this.companyMembers = companyMembers;
		this.memberPromotes = memberPromotes;
		this.stores = stores;
		this.memberPrepaids = memberPrepaids;
		this.roles = roles;
		this.goodses = goodses;
		this.memberVips = memberVips;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_COMPANY")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "COMPANY_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getCompanyId() {
		return this.companyId;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}

	@Column(name = "NAME", nullable = false, length = 120)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "IS_OPEN", nullable = false, precision = 1, scale = 0)
	public Boolean getIsOpen() {
		return this.isOpen;
	}

	public void setIsOpen(Boolean isOpen) {
		this.isOpen = isOpen;
	}

	@Column(name = "CONTACTS", nullable = false, length = 60)
	public String getContacts() {
		return this.contacts;
	}

	public void setContacts(String contacts) {
		this.contacts = contacts;
	}

	@Column(name = "PHONE", nullable = false, length = 20)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "ADDRESS", nullable = false, length = 250)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "PRODUCT", length = 100)
	public String getProduct() {
		return this.product;
	}

	public void setProduct(String product) {
		this.product = product;
	}

	@Column(name = "PROFILE")
	public String getProfile() {
		return this.profile;
	}

	public void setProfile(String profile) {
		this.profile = profile;
	}

	@Column(name = "CODE_PREFIX", nullable = false, precision = 8, scale = 0)
	public Integer getCodePrefix() {
		return this.codePrefix;
	}

	public void setCodePrefix(Integer codePrefix) {
		this.codePrefix = codePrefix;
	}

	@Column(name = "CODE_SEQ", nullable = false, precision = 8, scale = 0)
	public Integer getCodeSeq() {
		return this.codeSeq;
	}

	public void setCodeSeq(Integer codeSeq) {
		this.codeSeq = codeSeq;
	}

	@Column(name = "CODE_REMAIN", nullable = false, precision = 8, scale = 0)
	public Integer getCodeRemain() {
		return this.codeRemain;
	}

	public void setCodeRemain(Integer codeRemain) {
		this.codeRemain = codeRemain;
	}

	@Column(name = "STORE_REMAIN", nullable = false, precision = 8, scale = 0)
	public Integer getStoreRemain() {
		return this.storeRemain;
	}

	public void setStoreRemain(Integer storeRemain) {
		this.storeRemain = storeRemain;
	}

	@Column(name = "CAT_REMAIN", nullable = false, precision = 8, scale = 0)
	public Integer getCatRemain() {
		return this.catRemain;
	}

	public void setCatRemain(Integer catRemain) {
		this.catRemain = catRemain;
	}

	@Column(name = "MEM_REMAIN", nullable = false, precision = 8, scale = 0)
	public Integer getMemRemain() {
		return this.memRemain;
	}

	public void setMemRemain(Integer memRemain) {
		this.memRemain = memRemain;
	}

	@Column(name = "PREPAID", nullable = false, precision = 8)
	public Float getPrepaid() {
		return this.prepaid;
	}

	public void setPrepaid(Float prepaid) {
		this.prepaid = prepaid;
	}

	@Column(name = "MEM_PROMOTE", nullable = false, precision = 2, scale = 0)
	public Integer getMemPromote() {
		return this.memPromote;
	}

	public void setMemPromote(Integer memPromote) {
		this.memPromote = memPromote;
	}

	@Column(name = "ADD_TIME", nullable = false, precision = 15, scale = 0)
	public Long getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Long addTime) {
		this.addTime = addTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")
	public Set<GoodsClassify> getGoodsClassifies() {
		return this.goodsClassifies;
	}

	public void setGoodsClassifies(Set<GoodsClassify> goodsClassifies) {
		this.goodsClassifies = goodsClassifies;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")
	public Set<CompanyMember> getCompanyMembers() {
		return this.companyMembers;
	}

	public void setCompanyMembers(Set<CompanyMember> companyMembers) {
		this.companyMembers = companyMembers;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")
	public Set<MemberPromote> getMemberPromotes() {
		return this.memberPromotes;
	}

	public void setMemberPromotes(Set<MemberPromote> memberPromotes) {
		this.memberPromotes = memberPromotes;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")
	public Set<Store> getStores() {
		return this.stores;
	}

	public void setStores(Set<Store> stores) {
		this.stores = stores;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")
	public Set<MemberPrepaid> getMemberPrepaids() {
		return this.memberPrepaids;
	}

	public void setMemberPrepaids(Set<MemberPrepaid> memberPrepaids) {
		this.memberPrepaids = memberPrepaids;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")
	public Set<Role> getRoles() {
		return this.roles;
	}

	public void setRoles(Set<Role> roles) {
		this.roles = roles;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")
	public Set<Goods> getGoodses() {
		return this.goodses;
	}

	public void setGoodses(Set<Goods> goodses) {
		this.goodses = goodses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "company")
	public Set<MemberVip> getMemberVips() {
		return this.memberVips;
	}

	public void setMemberVips(Set<MemberVip> memberVips) {
		this.memberVips = memberVips;
	}

}